appchooserwidget: Don't limit application list unconditionally
authorFlorian Müllner <fmuellner@gnome.org>
Sun, 22 Oct 2017 22:18:19 +0000 (00:18 +0200)
committerMatthias Clasen <mclasen@redhat.com>
Thu, 26 Oct 2017 10:18:01 +0000 (06:18 -0400)
As documented, GtkAppChooser is "typically [used] for the purpose of
opening a file". However given that applications that support neither
opening files nor URLs are filtered out, the chooser is not actual
useful for any other (atypical) usage. Change that by only applying
the filtering if a content-type was set, and use the full unfiltered
list otherwise.

https://bugzilla.gnome.org/show_bug.cgi?id=789327

gtk/gtkappchooserwidget.c

index 54b22a28c216d118f995f72b8efc9e762f046eb1..91ad2282696aa4dc32e4721691b7493de1785d5f 100644 (file)
@@ -563,7 +563,8 @@ gtk_app_chooser_widget_add_section (GtkAppChooserWidget *self,
     {
       app = l->data;
 
-      if (!g_app_info_supports_uris (app) &&
+      if (self->priv->content_type != NULL &&
+          !g_app_info_supports_uris (app) &&
           !g_app_info_supports_files (app))
         continue;